home *** CD-ROM | disk | FTP | other *** search
- class classes.fx.CreationFX
- {
- var x;
- var y;
- var i;
- var id;
- var waveMax;
- var moveScript;
- var matrixCoords;
- var fxType;
- var enemyType;
- var clip;
- var formID;
- var c = 0;
- var c2 = 0;
- var waveC = 0;
- var endSeq = false;
- var Name = "creationFX";
- function CreationFX(pi, px, py, pfxType, penemyType, pwaveMax, pmoveScript, pmatrixCoords, pid)
- {
- this.x = px;
- this.y = py;
- this.i = pi;
- this.id = pid;
- this.waveMax = pwaveMax;
- this.moveScript = pmoveScript;
- this.matrixCoords = pmatrixCoords;
- this.fxType = pfxType;
- this.enemyType = penemyType;
- _root.d = _root.d + 1;
- this.clip = _root.attachMovie("creationFX" + this.fxType,"creationFX" + this.id + "Clip",_root.d + 200000);
- this.clip._x = this.x;
- this.clip._y = this.y;
- _root.formID = _root.formID + 1;
- this.formID = _root.formID;
- _root["form" + _root.formID] = [];
- if(this.fxType == "1D")
- {
- this.waveMax = 5;
- this.waveC = 4;
- }
- if(this.fxType == "2A" || this.fxType == "2B" || this.fxType == "2C")
- {
- this.waveMax = 3;
- this.waveC = 2;
- }
- if(this.fxType == "1D")
- {
- _root.audio.playLevel2("headBossIntro",30);
- }
- else
- {
- var _loc3_ = this.fxType.charAt(1);
- _root.audio.playLevel2("head" + _loc3_ + "Intro",30);
- }
- }
- function main()
- {
- if(this.clip.create)
- {
- this.c = this.c + 1;
- this.c2 = this.c2 + 1;
- if(this.c == this.i)
- {
- this.c = 0;
- var _loc5_ = [this.formID,this.waveC + 1];
- _root["create" + this.enemyType]([this.x - 10,this.y - 10,this.moveScript,this.matrixCoords[this.waveC],_loc5_]);
- _root.flashing = true;
- this.waveC = this.waveC + 1;
- if(this.waveC == this.waveMax)
- {
- this.endSeq = true;
- this.clip.create = false;
- if(this.fxType == "1D")
- {
- var _loc3_ = 0;
- var _loc4_ = _root.randRange(30,45);
- while(_loc3_ < _loc4_)
- {
- _root.fxID = _root.fxID + 1;
- _root["rampageTrailB" + _root.fxID] = new classes.fx.RampageTrailB(this.x,this.y,_root.fxID);
- _root.addFX("rampageTrailB" + _root.fxID);
- _loc3_ = _loc3_ + 1;
- }
- }
- }
- }
- this.clip._alpha = 100 - this.c2 * (100 / (this.i * this.waveMax)) / 2;
- this.clip._xscale = 100 - this.c2 * (100 / (this.i * this.waveMax)) / 2;
- this.clip._yscale = 100 - this.c2 * (100 / (this.i * this.waveMax)) / 2;
- }
- if(this.endSeq)
- {
- this.c2 = this.c2 + 1;
- this.clip._alpha = 100 - this.c2 * (100 / (this.i * this.waveMax)) / 2;
- this.clip._xscale = 100 - this.c2 * (100 / (this.i * this.waveMax)) / 2;
- this.clip._yscale = 100 - this.c2 * (100 / (this.i * this.waveMax)) / 2;
- if(this.clip._alpha < 2)
- {
- _root.removeFX("creationFX" + this.id);
- }
- }
- }
- }
-